#pragma once
#include <napi.h>
#include <iostream>
#include <thread>
// #include <sstream>
#include <winrt/Windows.Devices.Geolocation.h>
#include <winrt/Windows.Foundation.h>


using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Devices::Geolocation;
// 用于传递数据的结构
struct GeopositionData
{
  double latitude;
  double longitude;
  std::string error;
  // 添加构造函数
  GeopositionData(double lat, double lon, std::string err)
      : latitude(lat), longitude(lon), error(err) {}
};
#pragma comment(lib, "windowsapp")